<template>
  <van-pull-refresh v-model="refreshing" @refresh="emit('refresh')">
    <van-list
      v-model:loading="loading"
      :finished="finished"
      finished-text="没有更多了"
      @load="emit('load')"
    >
      <slot></slot>
      <van-back-top background="#FFA300" bottom="2rem"  v-if="backTop" style="background:#FFA300"/>
    </van-list>
  </van-pull-refresh>
</template>

<script setup>
const emit = defineEmits(['refresh', 'load'])
defineProps(['finished', 'backTop'])

const refreshing = defineModel('refreshing')
const loading = defineModel('loading')
</script>
